#include "CBase.h"
#include "SGD Wrappers\CSGD_TextureManager.h"

CBase::CBase(void)
{
	m_nTexID = -1;
	m_fPosX = 0;
	m_fPosY = 0;
	m_fVelX = 1;	// how fast we move
	m_fVelY = 1;
	m_unRefCount = 1;
	//m_nTexID = CSGD_TextureManager::GetInstance()->LoadTexture(
}


CBase::~CBase(void)
{
}


void CBase::Render(void) 
{
	CSGD_TextureManager::GetInstance()->Draw(GetTexID(),(int)m_fPosX,(int)m_fPosY);
}

void CBase::Update(float _fElapsedTime) 
{

	m_fPosX += (m_fVelX * _fElapsedTime);
	m_fPosY += (m_fVelY * _fElapsedTime);
}

RECT CBase::GetCollisonRect()
{
	RECT collisonRect = {(long)m_fPosX,(long)m_fPosY,(long)m_fPosX + m_nWidth,(long)m_fPosY+ m_nHeight};

	return collisonRect;
}

bool CBase::CheckCollison(IBaseInterface *_pIBase)
{
	return true;
}